package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.domain.ActMenuEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ActMenuMapper;
import com.ly.heart.service.IActMenuService;

/**
 * 流程模型与菜单关联Service业务层处理
 *
 * @author cxl
 * @date 2024-05-25
 */
@Service
public class ActMenuServiceImpl extends ServiceImpl<ActMenuMapper, ActMenuEntity> implements IActMenuService
{
    @Autowired
    private ActMenuMapper actMenuMapper;

    /**
     * 查询流程模型与菜单关联
     *
     * @param id 流程模型与菜单关联ID
     * @return 流程模型与菜单关联
     */
    @Override
    public ActMenuEntity selectActMenuById(String id)
    {
        return actMenuMapper.selectActMenuById(id);
    }

    /**
     * 查询流程模型与菜单关联列表
     *
     * @param actMenu 流程模型与菜单关联
     * @return 流程模型与菜单关联
     */
    @Override
    public List<ActMenuEntity> selectActMenuList(ActMenuEntity actMenu)
    {
        return actMenuMapper.selectActMenuList(actMenu);
    }

    /**
     * 新增流程模型与菜单关联
     *
     * @param actMenu 流程模型与菜单关联
     * @return 结果
     */
    @Override
    public int insertActMenu(ActMenuEntity actMenu)
    {
        actMenu.setCreateTime(DateUtils.getNowDate());
        return actMenuMapper.insertActMenu(actMenu);
    }

    /**
     * 修改流程模型与菜单关联
     *
     * @param actMenu 流程模型与菜单关联
     * @return 结果
     */
    @Override
    public int updateActMenu(ActMenuEntity actMenu)
    {
        return actMenuMapper.updateActMenu(actMenu);
    }

    /**
     * 批量删除流程模型与菜单关联
     *
     * @param ids 需要删除的流程模型与菜单关联ID
     * @return 结果
     */
    @Override
    public int deleteActMenuByIds(String[] ids)
    {
        return actMenuMapper.deleteActMenuByIds(ids);
    }

    /**
     * 删除流程模型与菜单关联信息
     *
     * @param id 流程模型与菜单关联ID
     * @return 结果
     */
    @Override
    public int deleteActMenuById(String id)
    {
        return actMenuMapper.deleteActMenuById(id);
    }
}
